<template>
  <div id="app">
    <nav>
      <router-link to="/home">Home</router-link> |
      <router-link to="/about">About</router-link> |
      <!-- 类似于a标签 -->
      <router-link to="/new">new</router-link> |
      <router-link to="/games">游戏咨询</router-link> |
      <router-link to="/auth">编程式导航</router-link> |
      <router-link to="/route">路由守卫</router-link>
    </nav>
    <!-- <component :is="浏览器地址栏地址，指向路由配置的组件"> -->
    <router-view></router-view>
  </div>
</template>

<style lang="scss">
html,
body {
  margin: 0;
  height: 100%;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  height: 100%;
  display: flex;
  flex-flow: column nowrap;
}

nav {
  padding: 14px;
  background-color: #999;
  color: white;

  a {
    font-weight: bold;
    color: #2c3e50;

    // &.router-link-exact-active {
    //   color: #42b983;
    // }
    &.router-link-active {
      color: #42b983;
    }
  }
}
</style>
